pub fn square(s: u32) -> u64 {
    if s == 0 || s > 64 {
        panic!("Square must be between 1 and 64");
    }
    2_u64.pow(s - 1)
}

pub fn total() -> u64 {
    (1..=64)
        .into_iter()
        .fold(0, |acc, v| acc + square(v))
}

fn process_square_case(input: u32, expected: u64) {
    assert_eq!(square(input), expected);
}

#[test]
#[ignore]
#[should_panic(expected = "Square must be between 1 and 64")]
fn square_0_raises_an_exception() {
    square(0);
}
